#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int sum = 0;
int renew(int a)
{
	int n = 1;
	if ((a & n) == 1)
	{
		sum += 1;
		a= a >> 1;
		renew(a);
	}
	return sum;
}
int main()
{
	int a = 0;
	scanf("%d", &a);
	if (a != 0)
	{
		renew(a);
	}
	printf("%d ", sum);
	return 0;
}